home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / co.man < prev    next >
Encoding:
Text File  |  1989-02-13  |  13.1 KB  |  331 lines

  1.  
  2.  
  3.  
  4. CO                        User Commands                        CO
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      co - check out RCS revisions
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ccoo [ options ] file ...
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _C_o retrieves revisions from RCS files.  Each file name end-
  16.      ing in `,v' is taken to be an RCS file.  All other files are
  17.      assumed to be working files.  _C_o retrieves a revision from
  18.      each RCS file and stores it into the corresponding working
  19.      file.
  20.  
  21.      Pairs of RCS files and working files may be specified in 3
  22.      ways (see also the example section).
  23.  
  24.      1) Both the RCS file and the working file are given. The RCS
  25.      file name is of the form _p_a_t_h_1/_w_o_r_k_f_i_l_e,v and the working
  26.      file name is of the form _p_a_t_h_2/_w_o_r_k_f_i_l_e, where _p_a_t_h_1/ and
  27.      _p_a_t_h_2/ are (possibly different or empty) paths and _w_o_r_k_f_i_l_e
  28.      is a file name.
  29.  
  30.      2) Only the RCS file is given. Then the working file is
  31.      created in the current directory and its name is derived
  32.      from the name of the RCS file by removing _p_a_t_h_1/ and the
  33.      suffix `,v'.
  34.  
  35.      3) Only the working file is given.  Then the name of the RCS
  36.      file is derived from the name of the working file by remov-
  37.      ing _p_a_t_h_2/ and appending the suffix `,v'.
  38.  
  39.      If the RCS file is omitted or specified without a path, then
  40.      _c_o looks for the RCS file first in the directory ./RCS and
  41.      then in the current directory.
  42.  
  43.      Revisions of an RCS file may be checked out locked or
  44.      unlocked. Locking a revision prevents overlapping updates. A
  45.      revision checked out for reading or processing (e.g., com-
  46.      piling) need not be locked. A revision checked out for edit-
  47.      ing and later checkin must normally be locked. Locking a
  48.      revision currently locked by another user fails. (A lock may
  49.      be broken with the _r_c_s (1) command.) _C_o with locking
  50.      requires the caller to be on the access list of the RCS
  51.      file, unless he is the owner of the file or the superuser,
  52.      or the access list is empty.  _C_o without locking is not sub-
  53.      ject to accesslist restrictions.
  54.  
  55.      A revision is selected by number, checkin date/time, author,
  56.      or state. If none of these options are specified, the latest
  57.      revision on the trunk is retrieved.  When the options are
  58.      applied in combination, the latest revision that satisfies
  59.      all of them is retrieved.  The options for date/time,
  60.  
  61.  
  62.  
  63. Purdue University            6/29/83                            1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CO                        User Commands                        CO
  71.  
  72.  
  73.  
  74.      author, and state retrieve a revision on the _s_e_l_e_c_t_e_d
  75.      _b_r_a_n_c_h. The selected branch is either derived from the revi-
  76.      sion number (if given), or is the highest branch on the
  77.      trunk.  A revision number may be attached to one of the
  78.      options --ll, --pp, --qq, or --rr.
  79.  
  80.      A _c_o command applied to an RCS file with no revisions
  81.      creates a zero-length file.  _C_o always performs keyword sub-
  82.      stitution (see below).
  83.  
  84.      --ll[_r_e_v]    locks the checked out revision for the caller.
  85.                 If omitted, the checked out revision is not
  86.                 locked.  See option --rr for handling of the revi-
  87.                 sion number _r_e_v.
  88.  
  89.      --pp[_r_e_v]    prints the retrieved revision on the std. output
  90.                 rather than storing it in the working file.  This
  91.                 option is useful when _c_o is part of a pipe.
  92.  
  93.      --qq[_r_e_v]    quiet mode; diagnostics are not printed.
  94.  
  95.      --dd_d_a_t_e     retrieves the latest revision on the selected
  96.                 branch whose checkin date/time is less than or
  97.                 equal to _d_a_t_e.  The date and time may be given in
  98.                 free format and are converted to local time.
  99.                 Examples of formats for _d_a_t_e:
  100.  
  101.                 _2_2-_A_p_r_i_l-_1_9_8_2, _1_7:_2_0-_C_D_T,
  102.                 _2:_2_5 _A_M, _D_e_c. _2_9, _1_9_8_3,
  103.                 _T_u_e-_P_D_T, _1_9_8_1, _4_p_m _J_u_l _2_1         (free format),
  104.                 _F_r_i, _A_p_r_i_l _1_6 _1_5:_5_2:_2_5 _E_S_T _1_9_8_2 (output of ctime).
  105.  
  106.                 Most fields in the date and time may be
  107.                 defaulted.  _C_o determines the defaults in the
  108.                 order year, month, day, hour, minute, and second
  109.                 (most to least significant). At least one of
  110.                 these fields must be provided. For omitted fields
  111.                 that are of higher significance than the highest
  112.                 provided field, the current values are assumed.
  113.                 For all other omitted fields, the lowest possible
  114.                 values are assumed.  For example, the date "20,
  115.                 10:30" defaults to 10:30:00 of the 20th of the
  116.                 current month and current year.  The date/time
  117.                 must be quoted if it contains spaces.
  118.  
  119.      --rr[_r_e_v]    retrieves the latest revision whose number is
  120.                 less than or equal to _r_e_v.  If _r_e_v indicates a
  121.                 branch rather than a revision, the latest revi-
  122.                 sion on that branch is retrieved.  _R_e_v is com-
  123.                 posed of one or more numeric or symbolic fields
  124.                 separated by `.'. The numeric equivalent of a
  125.                 symbolic field is specified with the --nn option of
  126.  
  127.  
  128.  
  129. Purdue University            6/29/83                            2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CO                        User Commands                        CO
  137.  
  138.  
  139.  
  140.                 the commands _c_i and _r_c_s.
  141.  
  142.      --ss_s_t_a_t_e    retrieves the latest revision on the selected
  143.                 branch whose state is set to _s_t_a_t_e.
  144.  
  145.      --ww[_l_o_g_i_n]  retrieves the latest revision on the selected
  146.                 branch which was checked in by the user with
  147.                 login name _l_o_g_i_n. If the argument _l_o_g_i_n is omit-
  148.                 ted, the caller's login is assumed.
  149.  
  150.      --jj_j_o_i_n_l_i_s_t generates a new revision which is the join of the
  151.                 revisions on _j_o_i_n_l_i_s_t.  _J_o_i_n_l_i_s_t is a comma-
  152.                 separated list of pairs of the form _r_e_v_2:_r_e_v_3,
  153.                 where _r_e_v_2 and _r_e_v_3 are (symbolic or numeric)
  154.                 revision numbers.  For the initial such pair,
  155.                 _r_e_v_1 denotes the revision selected by the options
  156.                 --ll, ..., --ww. For all other pairs, _r_e_v_1 denotes
  157.                 the revision generated by the previous pair.
  158.                 (Thus, the output of one join becomes the input
  159.                 to the next.)
  160.  
  161.                 For each pair, _c_o joins revisions _r_e_v_1 and _r_e_v_3
  162.                 with respect to _r_e_v_2.  This means that all
  163.                 changes that transform _r_e_v_2 into _r_e_v_1 are applied
  164.                 to a copy of _r_e_v_3.  This is particularly useful
  165.                 if _r_e_v_1 and _r_e_v_3 are the ends of two branches
  166.                 that have _r_e_v_2 as a common ancestor. If _r_e_v_1 <
  167.                 _r_e_v_2 < _r_e_v_3 on the same branch, joining generates
  168.                 a new revision which is like _r_e_v_3, but with all
  169.                 changes that lead from _r_e_v_1 to _r_e_v_2 undone.  If
  170.                 changes from _r_e_v_2 to _r_e_v_1 overlap with changes
  171.                 from _r_e_v_2 to _r_e_v_3, _c_o prints a warning and
  172.                 includes the overlapping sections, delimited by
  173.                 the lines <<<<<<< _r_e_v_1, =======, and
  174.                 >>>>>>> _r_e_v_3.
  175.  
  176.                 For the initial pair, _r_e_v_2 may be omitted. The
  177.                 default is the common ancestor.  If any of the
  178.                 arguments indicate branches, the latest revisions
  179.                 on those branches are assumed. If the option --ll
  180.                 is present, the initial _r_e_v_1 is locked.
  181.  
  182. KKEEYYWWOORRDD SSUUBBSSTTIITTUUTTIIOONN
  183.      Strings of the form $_k_e_y_w_o_r_d$ and $_k_e_y_w_o_r_d:...$ embedded in
  184.      the text are replaced with strings of the form
  185.      $_k_e_y_w_o_r_d: _v_a_l_u_e $, where _k_e_y_w_o_r_d and _v_a_l_u_e are pairs listed
  186.      below.  Keywords may be embedded in literal strings or com-
  187.      ments to identify a revision.
  188.  
  189.      Initially, the user enters strings of the form $_k_e_y_w_o_r_d$.
  190.      On checkout, _c_o replaces these strings with strings of the
  191.      form $_k_e_y_w_o_r_d: _v_a_l_u_e $. If a revision containing strings of
  192.  
  193.  
  194.  
  195. Purdue University            6/29/83                            3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. CO                        User Commands                        CO
  203.  
  204.  
  205.  
  206.      the latter form is checked back in, the value fields will be
  207.      replaced during the next checkout.  Thus, the keyword values
  208.      are automatically updated on checkout.
  209.  
  210.      Keywords and their corresponding values:
  211.  
  212.      $Author$     The login name of the user who checked in the
  213.                   revision.
  214.  
  215.      $Date$       The date and time the revision was checked in.
  216.  
  217.      $Header$     A standard header containing the RCS file name,
  218.                   the revision number, the date, the author, and
  219.                   the state.
  220.  
  221.      $Locker$     The login name of the user who locked the revi-
  222.                   sion (empty if not locked).
  223.  
  224.      $Log$        The log message supplied during checkin, pre-
  225.                   ceded by a header containing the RCS file name,
  226.                   the revision number, the author, and the date.
  227.                   Existing log messages are NOT replaced.
  228.                   Instead, the new log message is inserted after
  229.                   $_L_o_g:...$.  This is useful for accumulating a
  230.                   complete change log in a source file.
  231.  
  232.      $Revision$   The revision number assigned to the revision.
  233.  
  234.      $Source$     The full pathname of the RCS file.
  235.  
  236.      $State$      The state assigned to the revision with _r_c_s -_s
  237.                   or _c_i -_s.
  238.  
  239. DDIIAAGGNNOOSSTTIICCSS
  240.      The RCS file name, the working file name, and the revision
  241.      number retrieved are written to the diagnostic output.  The
  242.      exit status always refers to the last file checked out, and
  243.      is 0 if the operation was successful, 1 otherwise.
  244.  
  245. EEXXAAMMPPLLEESS
  246.      Suppose the current directory contains a subdirectory `RCS'
  247.      with an RCS file `io.c,v'. Then all of the following com-
  248.      mands retrieve the latest revision from `RCS/io.c,v' and
  249.      store it into `io.c'.
  250.  
  251.              co  io.c;    co RCS/io.c,v;    co  io.c,v;
  252.              co  io.c  RCS/io.c,v;    co  io.c  io.c,v;
  253.              co  RCS/io.c,v  io.c;    co  io.c,v  io.c;
  254.  
  255. FFIILLEE MMOODDEESS
  256.      The working file inherits the read and execute permissions
  257.      from the RCS file. In addition, the owner write permission
  258.  
  259.  
  260.  
  261. Purdue University            6/29/83                            4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. CO                        User Commands                        CO
  269.  
  270.  
  271.  
  272.      is turned on, unless the file is checked out unlocked and
  273.      locking is set to _s_t_r_i_c_t (see _r_c_s (1)).
  274.  
  275.      If a file with the name of the working file exists already
  276.      and has write permission, _c_o aborts the checkout if --qq is
  277.      given, or asks whether to abort if --qq is not given. If the
  278.      existing working file is not writable, it is deleted before
  279.      the checkout.
  280.  
  281. FFIILLEESS
  282.      The caller of the command must have write permission in the
  283.      working directory, read permission for the RCS file, and
  284.      either read permission (for reading) or read/write permis-
  285.      sion (for locking) in the directory which contains the RCS
  286.      file.
  287.  
  288.      A number of temporary files are created.  A semaphore file
  289.      is created in the directory of the RCS file to prevent
  290.      simultaneous update.
  291.  
  292. IIDDEENNTTIIFFIICCAATTIIOONN
  293.      Author: Walter F. Tichy, Purdue University, West Lafayette,
  294.      IN, 47907.
  295.      Revision Number: 3.1 ; Release Date: 83/04/04 .
  296.      Copyright (C) 1982 by Walter F. Tichy.
  297.  
  298. SSEEEE AALLSSOO
  299.      ci (1), ident(1), rcs (1), rcsdiff (1), rcsintro (1),
  300.      rcsmerge (1), rlog (1), rcsfile (5), sccstorcs (8).
  301.      Walter F. Tichy, "Design, Implementation, and Evaluation of
  302.      a Revision Control System," in _P_r_o_c_e_e_d_i_n_g_s _o_f _t_h_e _6_t_h _I_n_t_e_r_-
  303.      _n_a_t_i_o_n_a_l _C_o_n_f_e_r_e_n_c_e _o_n _S_o_f_t_w_a_r_e _E_n_g_i_n_e_e_r_i_n_g, IEEE, Tokyo,
  304.      Sept. 1982.
  305.  
  306. LLIIMMIITTAATTIIOONNSS
  307.      The option --dd gets confused in some circumstances, and
  308.      accepts no date before 1970.  There is no way to suppress
  309.      the expansion of keywords, except by writing them dif-
  310.      ferently. In nroff and troff, this is done by embedding the
  311.      null-character `\&' into the keyword.
  312.  
  313. BBUUGGSS
  314.      The option --jj does not work for files that contain lines
  315.      with a single `.'.
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. Purdue University            6/29/83                            5
  328.  
  329.  
  330.  
  331.